package dml.users.aggr;

public class Ban {
	private long banTime;
	private long toReleaseTime;
	private boolean released;

	public Ban() {
	}

	public Ban(long banTime, long toReleaseTime) {
		this.banTime = banTime;
		this.toReleaseTime = toReleaseTime;
	}

	/**
	 * 是否成功释放
	 */
	public boolean toRelease(long currTime) {
		if (released) {
			return false;
		}
		if (currTime >= toReleaseTime) {
			released = true;
			return true;
		}
		return false;
	}

	public long getBanTime() {
		return banTime;
	}

	public long getToReleaseTime() {
		return toReleaseTime;
	}

	public void setToReleaseTime(long toReleaseTime) {
		this.toReleaseTime = toReleaseTime;
	}

	public void setBanTime(long banTime) {
		this.banTime = banTime;
	}

	public boolean isReleased() {
		return released;
	}

	public void setReleased(boolean released) {
		this.released = released;
	}

}
